# -*- coding: utf-8 -*-
import scrapy
from HuXiu.items import HuxiuItem

class HuXiuSpider(scrapy.Spider):
    name = 'hxspider'
    allowed_domains = ['bbs.hupu.com']
    start_urls = ['https://bbs.hupu.com/all-gambia']

    def parse(self, response):
        print(">>>>>>>>>body:>>>>>",response.body);
        # for s in response.xpath('//div[@class="mod-info-flow"]/div/div[@class="mob-ctt"]'):
        #     item = HuxiuItem()
        #     item['title'] = s.xpath('h2/a/text()')[0].extract()
        #     item['link'] = s.xpath('h2/a/@href')[0].extract()
        #     url = response.urljoin(item['link'])
        #     item['author'] = s.xpath('div/a/span/text()')[0].extract()
        #     item['introduction'] = s.xpath('div[2]/text()')[0].extract()
        #     item['time'] = s.xpath('div/span/text()')[0].extract()
        #     print(item)
